import { createApp } from 'vue'
import '@/styles/index.scss'
import 'virtual:svg-icons-register'
import 'element-plus/dist/index.css'
import ElementPlus from 'element-plus'
//@ts-ignore忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import App from './App.vue'
import router from '@/router/index'
import pinia from '@/store'
// import SvgIcon from '@/components/SvgIcon/index.vue' // 注册为全局组件
import globalComponents from '@/components' // 批量注册全局组件

const app = createApp(App)

app.use(ElementPlus, {
  locale: zhCn,
})
// 安装自定义插件  全局组件
app.use(globalComponents)
// 安装单个全局组件
// app.component('SvgIcon', SvgIcon)
app.use(pinia)
app.use(router)
import './permissions'
app.mount('#app')
